godlikepanos/anki-3d-engine
ThirdParty/Sdl3/CMakeLists.txt
:19
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options(
"$<$<OR:$<CXX_COMPILER_ID:MSVC>,$<C_COMPILER_ID:MSVC>>:/W4;/WX>"
"$<$<OR:$<CXX_COMPILER_ID:GNU>,$<C_COMPILER_ID:GNU>>:-pedantic;-Wall;-Wextra;-Wsuggest-override;-Wshadow;-Wzero-as-null-pointer-constant;-Wformat-security>"
"$<$<OR:$<CXX_COMPILER_ID:Clang>,$<C_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:AppleClang>>:-pedantic;-Wall;-Wextra;-Wshadow;-Wzero-as-null-pointer-constant;-Wformat-security>"
)
target_compile_options(glfw PRIVATE
"$<$<C_COMPILER_ID:AppleClang>:-std=c99>"
"$<$<C_COMPILER_ID:Clang>:-std=c99>"
"$<$<C_COMPILER_ID:GNU>:-std=c99>")
target_compile_options(qpl_c_api
PRIVATE $<$<C_COMPILER_ID:GNU,Clang>:$<$<CONFIG:Release>:-O3;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2>>
PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:${QPL_LINUX_TOOLCHAIN_CPP_EMBEDDED_FLAGS}>)
target_compile_options(ghc_filesystem INTERFACE "$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options($<$<C_COMPILER_ID:Clang>:-fcolor-diagnostics> $<$<CXX_COMPILER_ID:Clang>:-fcolor-diagnostics>)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_compile_options(entityx PUBLIC $<$<C_COMPILER_ID:Clang,GNU>:-Wno-deprecated-declarations -Wno-ambiguous-reversed-operator>)
add_compile_options("$<$<C_COMPILER_ID:AppleClang>:-std=c99>"
"$<$<C_COMPILER_ID:Clang>:-std=c99>"
"$<$<C_COMPILER_ID:GNU>:-std=c99>")
target_link_options(
${_test_name}
PRIVATE
"$<$<AND:$<C_COMPILER_ID:AppleClang>,$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,15.0>>:LINKER:-no_warn_duplicate_libraries>"
)
target_compile_options(
${PROJECT_NAME} PRIVATE $<$<C_COMPILER_ID:Clang,AppleClang>:-Wno-quoted-include-in-framework-header
-Wno-comma>)
target_compile_options(qpl_c_api
PRIVATE $<$<C_COMPILER_ID:GNU,Clang>:$<$<CONFIG:Release>:-O3;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2>>
PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:${QPL_LINUX_TOOLCHAIN_CPP_EMBEDDED_FLAGS}>)
set_target_properties(qplcore_px PROPERTIES
$<$<C_COMPILER_ID:GNU>:C_STANDARD 17>)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_compile_options(ctre-test-${test} PUBLIC "$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_compile_options(glfw PRIVATE
"$<$<C_COMPILER_ID:Clang>:-Wall>"
"$<$<C_COMPILER_ID:GNU>:-Wall>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_compile_options(public-header-warnings PRIVATE
$<$<C_COMPILER_ID:AppleClang,Clang>:-Weverything>
$<$<C_COMPILER_ID:GNU>:-Wextra>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Werror>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-declaration-after-statement>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-disabled-macro-expansion>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-c++98-compat-pedantic>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-pre-c2x-compat>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-unsafe-buffer-usage>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-padded>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-reserved-identifier>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-documentation-unknown-command>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-unknown-warning-option>
$<$<C_COMPILER_ID:MSVC>:/W4>
$<$<C_COMPILER_ID:MSVC>:/WX>
$<$<C_COMPILER_ID:MSVC>:/wd4324>
)
target_compile_options(glfw PRIVATE
"$<$<C_COMPILER_ID:AppleClang>:-std=c99>"
"$<$<C_COMPILER_ID:Clang>:-std=c99>"
"$<$<C_COMPILER_ID:GNU>:-std=c99>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_compile_options(ghc_filesystem INTERFACE "$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<C_COMPILER_ID:AppleClang>:-std=c99>"
"$<$<C_COMPILER_ID:Clang>:-std=c99>"
"$<$<C_COMPILER_ID:GNU>:-std=c99>")
set_source_files_properties(
predicates.c
PROPERTIES
COMPILE_OPTIONS
"$<$<C_COMPILER_ID:Clang,AppleClang,GNU>:-w>$<$<C_COMPILER_ID:MSVC>:/W0>"
SKIP_UNITY_BUILD_INCLUSION TRUE
)
target_compile_options(
${CMAKE_PROJECT_NAME}
PRIVATE $<$<C_COMPILER_ID:Clang,AppleClang>:-Wno-quoted-include-in-framework-header -Wno-comma>
)
target_compile_options(fwgs_opusfile
PRIVATE
$<$<C_COMPILER_ID:MSVC>:/wd4267>
$<$<C_COMPILER_ID:MSVC>:/wd4244>
$<$<C_COMPILER_ID:MSVC>:/wd4090>
$<$<C_COMPILER_ID:Clang,GNU>:-std=c89>
$<$<C_COMPILER_ID:Clang,GNU>:-pedantic>
$<$<C_COMPILER_ID:Clang,GNU>:-Wall>
$<$<C_COMPILER_ID:Clang,GNU>:-Wextra>
$<$<C_COMPILER_ID:Clang,GNU>:-Wno-parentheses>
$<$<C_COMPILER_ID:Clang,GNU>:-Wno-long-long>
$<$<C_COMPILER_ID:Clang,GNU>:-fvisibility=hidden>
)
target_link_options(${PROJECT_NAME}
PUBLIC
$<$<C_COMPILER_ID:MSVC>:/fsanitize=address>
$<$<NOT:$<C_COMPILER_ID:MSVC>>:-g -fsanitize=address>)
target_compile_options (ik_python_obj
PUBLIC $<$<C_COMPILER_ID:MSVC>:
/EHa /MTd /W4 /WX /wd4115 /wd4201 /wd4100 /D_CRT_SECURE_NO_DEPRECATE
>
PUBLIC $<$<C_COMPILER_ID:GNU>:
-Wall -Wextra -Werror -pedantic -pedantic-errors -Wno-missing-field-initializers -Wshadow
$<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer>
>
PUBLIC $<$<C_COMPILER_ID:Clang>:
-Wall -Wextra -Werror -pedantic -pedantic-errors -Wno-missing-field-initializers -Wshadow
$<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer>
>
)
target_compile_options(glfw PRIVATE
"$<$<C_COMPILER_ID:Clang>:-Wall>"
"$<$<C_COMPILER_ID:GNU>:-Wall>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_link_options(${target_in}
PRIVATE
$<$<C_COMPILER_ID:AppleClang>:LINKER:-undefined,error>
$<$<C_COMPILER_ID:Clang>:LINKER:-undefined,error>
$<$<C_COMPILER_ID:GNU>:LINKER:--as-needed>
$<$<C_COMPILER_ID:GNU>:LINKER:--no-undefined>
)
list( APPEND OPTIONS
PRIVATE
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:
-Wconversion
-Wall
-Wextra
-pedantic
-Wundef
-Wpointer-arith
-Wno-long-long
-Wnested-externs
-Wmissing-prototypes
-Wstrict-prototypes
>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-keyword-macro>
)
target_compile_options(${target}
PRIVATE
$<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:GNU>>:-w>
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:-w>
$<$<C_COMPILER_ID:MSVC>:/w>
$<$<CXX_COMPILER_ID:MSVC>:/w>
)
target_compile_options(swmm5
PUBLIC
$<$<C_COMPILER_ID:MSVC>:
$<$<CONFIG:Release>:/GL>
$<$<CONFIG:Release>:/fp:fast>
$<$<CONFIG:Release>:/Zi>
>
)
set_target_properties(core_iaa PROPERTIES
$<$<C_COMPILER_ID:MSVC>:C_STANDARD 18>
$<$<C_COMPILER_ID:GNU,Clang>:C_STANDARD 17>
C_VISIBILITY_PRESET hidden)
add_compile_options("$<$<C_COMPILER_ID:AppleClang>:-std=c99>"
"$<$<C_COMPILER_ID:Clang>:-std=c99>"
"$<$<C_COMPILER_ID:GNU>:-std=c99>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_compile_options(${wintarget} PRIVATE
"$<$<C_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>"
"$<$<CXX_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>"
)
target_compile_options(csp_common INTERFACE
-Wall
-Wcast-align
-Werror
-Wextra
-Wmissing-prototypes
-Wpedantic
-Wpointer-arith
-Wshadow
-Wwrite-strings
$<$<C_COMPILER_ID:Clang>:-Wno-gnu-zero-variadic-macro-arguments>)
target_compile_options(STM32::NoSys INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nosys.specs>)